export const constantRoute = [
  {
    name: 'login',
    path: '/login',
    component: (): componentType => import('@/views/login/index.vue'),
    meta: {
      title: '登录', //菜单需要的标题
      hidden: true, //在菜单中是否隐藏 true隐藏
      icon: 'Promotion', //菜单文字左侧的图标
    },
  },
  {
    name: 'layout',
    path: '/',
    component: (): componentType => import('@/layout/index.vue'),
    meta: {
      title: '', // 这个不需要展示
      hidden: false,
      icon: '', // 这个不需要展示
    },
    redirect: '/home', //访问的时候直接重定向到home
    children: [
      {
        name: 'Home',
        path: '/home',
        component: (): componentType => import('@/views/home/index.vue'),
        meta: {
          title: '首页', //菜单需要的标题
          hidden: false,
          icon: 'HomeFilled',
        },
      },
    ],
  },

  {
    name: 'Screen',
    path: '/screen',
    component: (): componentType => import('@/views/screen/index.vue'),
    meta: {
      title: '数据大屏',
      hidden: false,
      icon: 'Platform',
    },
  },
  {
    name: '404',
    path: '/404',
    component: (): componentType => import('@/views/404/index.vue'),
    meta: {
      title: '404',
      hidden: true,
      icon: 'Platform',
    },
  },
  {
    name: 'Any',
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    component: (): componentType => import('@/views/screen/index.vue'),
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'Platform',
    },
  },

  {
    name: 'Acl',
    path: '/acl',
    redirect: '/acl/user',
    component: (): componentType => import('@/layout/index.vue'),
    meta: {
      title: '权限管理',
      hidden: false,
      icon: 'Lock',
    },
    children: [
      {
        name: 'AclUser',
        path: '/acl/user',
        component: (): componentType => import('@/views/acl/user/index.vue'),
        meta: {
          title: '用户管理', //菜单需要的标题
          hidden: false,
          icon: 'User',
        },
      },
      {
        name: 'AclRole',
        path: '/acl/role',
        component: (): componentType => import('@/views/acl/role/index.vue'),
        meta: {
          title: '角色管理', //菜单需要的标题
          hidden: false,
          icon: 'UserFilled',
        },
      },
      {
        name: 'AclPerssion',
        path: '/acl/perssion',
        component: (): componentType =>
          import('@/views/acl/perssion/index.vue'),
        meta: {
          title: '菜单管理', //菜单需要的标题
          hidden: false,
          icon: 'List',
        },
      },
    ],
  },

  {
    name: 'Product',
    path: '/product',
    redirect: '/product/trademark',
    component: (): componentType => import('@/layout/index.vue'),
    meta: {
      title: '商品管理',
      hidden: false,
      icon: 'Goods',
    },
    children: [
      {
        name: 'ProdTrademark',
        path: '/product/trademark',
        component: (): componentType =>
          import('@/views/product/trademark/index.vue'),
        meta: {
          title: '品牌管理',
          hidden: false,
          icon: 'ShoppingCartFull',
        },
      },
      {
        name: 'ProdAttr',
        path: '/product/attr',
        component: (): componentType =>
          import('@/views/product/attr/index.vue'),
        meta: {
          title: '属性管理',
          hidden: false,
          icon: 'CollectionTag',
        },
      },
      {
        name: 'ProdSku',
        path: '/product/sku',
        component: (): componentType => import('@/views/product/sku/index.vue'),
        meta: {
          title: 'sku管理',
          hidden: false,
          icon: 'Money',
        },
      },
      {
        name: 'ProdSpu',
        path: '/product/spu',
        component: (): componentType => import('@/views/product/spu/index.vue'),
        meta: {
          title: 'spu管理',
          hidden: false,
          icon: 'Coin',
        },
      },
    ],
  },
]
